@extends("home.layouts")

@section("content")
	<div class="container">
  <ul class="breadcrumb">
        <li><a href="http://shop14.jccms.cn/index.php?route=common/home"><i class="fa fa-home"></i></a></li>
        <li><a href="http://shop14.jccms.cn/index.php?route=account/account">賬戶1</a></li>
      </ul>
    <div class="row">
     <div id="content" class="col-sm-9">      
        <h2>订单</h2>
        <div class="table-responsive">

        <table class="table table-bordered table-hover">
          <tbody>
          	<thead>
          		<th>订单号</th>
          		<th>商品数量</th>
          		<th>订单金额</th>
          		<th>订单状态</th>
          		<th>创建时间</th>
              <th>操作</th>
          	</thead>
            @foreach($data as $v)
            <tr>
              <td>{{ $v->order_number }}</td>
              <td class="text-left">
                {{ $v->order_goods->sum('goods_quantity') }}
              </td>
              <td>{{ $v->order_total_price }}</td>
              <td>{{ $v->order_stat }}</td>
              <td>{{ $v->created_at }}</td>
              <td class="text-right">
                @if($v->order_action)
                <a href="{{ route('order.pay', $v) }}" class="btn btn-info">
                  {{ $v->order_action['text']??'' }}</a> &nbsp; 
                @endif  
                <!-- <a data-type="delete" href="javascript:;" data-url="{{ route('address.destroy', $v) }}" class="btn btn-danger">取消</a> -->
              </td>
            </tr>
            @endforeach
          </tbody>
        </table>
      </div>

      <!-- <div class="buttons clearfix">
        <div class="pull-left"><a href="http://shop14.jccms.cn/index.php?route=account/account" class="btn btn-default">返回</a></div>
        <div class="pull-right"><a href="{{ route('address.create') }}" class="btn btn-primary"></a></div>
      </div> -->
      </div>
</div>
</div>
@endsection